Skip to content

fix(daemon-client): name both versions and the side to upgrade on an RPC protocol mismatch - #5017

Merged
thymikee merged 1 commit into
callstack:mainfrom
imranbarbhuiya:fix/daemon-protocol-mismatch-versions
Nov 23, 2026
Merged

thymikee merged 1 commit into
callstack:mainfrom
imranbarbhuiya:fix/daemon-protocol-mismatch-versions

Conversation

@imranbarbhuiya

@imranbarbhuiya imranbarbhuiya commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The remote RPC protocol refusal said only "incompatible", so agents had to dig into details to learn which versions differed and what to upgrade. The message now names the client and remote versions and protocols, and says which side to upgrade. When the mismatched link is the daemon behind a proxy, it names that daemon, or tells you to upgrade both the client and the proxy. A client-local details.upgradeSide (remote, client or client-and-proxy) carries the same decision.

The wire format is unchanged; the ledger ack is updated.

Before / after

From tests (this needs an older remote daemon, so there's no local device run). Client 0.21.41 (protocol 3) against a remote daemon 0.21.36 (protocol 2):

base a4f2dcad0: Remote daemon RPC protocol is incompatible
head 75fb80a78: Remote daemon RPC protocol is incompatible: this client runs agent-device 0.21.41 (RPC protocol 3); the remote agent-device-daemon runs 0.21.36 (RPC protocol 2). Upgrade agent-device on the remote host.

Validation

  • Head 75fb80a78, check:affected --run --head, exactCommit: true. Every gate passes except unit, where upload-http-deadline and committed-source-tree fail the same way on clean main on this macOS host.
  • check:daemon-wire-compat passes against v0.21.41 with the protocol unchanged.
  • Four new cases (older and newer daemon, each direct and behind a proxy) fail without the fix.

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

@thymikee

Copy link
Copy Markdown
Member

Thanks for the clear message change. The change at 75fb80a is ready: the new message names both versions and protocols and says which side to upgrade, and the code looks correct.

Not blocking, and these can be taken or left: a proxy whose /health reports service: "" is treated as a direct link, because the proxy flag is encoded in the truthiness of the name (daemon-client-transport.ts:258, daemon-client-rpc.ts:270-281), so passing the upstream flag explicitly would avoid that. The new cases assert upgradeSide and the versions but not the message text or protocol numbers, and the new test does not call skipWhenLoopbackUnavailable(t) like its neighbours. service and version from the remote /health payload now go into the message unsanitized, so readHealthLink could bound their length and strip control characters. When both the proxy and its upstream are skewed, only the proxy link is named, which is the existing first-mismatch rule.

The Smoke Tests job failed in Install Linux desktop dependencies, where apt-get update timed out three times. The diff does not reach that step, and the other Smoke Tests jobs and Repo Guards & Compatibility pass at this commit, so the failure looks unrelated. Re-running that job should clear it.

No conflicts. Not verified here: the tests were not run locally, and no live run against an older remote daemon was done. The loopback tests use the production health reader, which is enough for a message-only change.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 23, 2026
@thymikee
thymikee merged commit 6490e80 into callstack:main Nov 23, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants